#pragma once

#include <d3dx9.h>
#include "ShaderIncludeDX9.h"
#include "PShader.h"

class CPShaderDX9: public CPShader
{
protected:
    LPD3DXBUFFER            m_pShaderCode;
    LPD3DXBUFFER            m_pShaderDebugInfo;
    LPD3DXCONSTANTTABLE     m_pConstantTable; 
    LPDIRECT3DPIXELSHADER9  m_pShader;

public:
    CPShaderDX9                        ( mString a_sFileName );
    ~CPShaderDX9                       ( );
    virtual mVoid Compile              ( );
    virtual mVoid Bind                 ( );
    /* adding constant into cbuffer */
    virtual mBool SendConstantValue    ( const std::string &a_sConstName, mVoid *a_pValue, size_t a_ValueSize, TChangeFreq a_ChangeFreq );
    virtual mBool SendTexture          ( const std::string &a_sTextureName, CTexture2D *a_pTexture );
};